<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tuiter bot</title>
<meta name="layout" content="layout"></meta>
</head>
<body>
	<content tag="title"> <g:message code="suggestions.title" /></content>
	<content tag="content2"> <g:if test="${msg}">
		<g:message code="${msg}" args="${args}" />
	</g:if> <g:else>
		<g:if test="${!autoSuggestions && !suggestions}">
			<g:message code="emptySgg.msg" args="${[account.screenName]}" />
		</g:if>
		<g:else>
			<div class="columnLeft">
				<p class="subtitle">
					<g:message code="autosuggestions.subtitle" />
				</p>
				<g:if test="${autoSuggestions}">
					<g:set var="counter" value="${0}" />
					<g:each in="${autoSuggestions}" var="sg">
						<g:if test="${sg.toString().length() > 31}">
							<div class="tooltip">
								${sg.toString().substring(0, 29).concat("...")}
								<span> ${autoSuggestionsTT.get(counter)}
								</span>
							</div>
						</g:if>
						<g:else>
							<div class="tooltip">
								${sg}
							</div>
						</g:else>
						<div class="rowProgressBar">
							<div class="ProgressBar">
								<div class="ProgressBarText">
									${String.valueOf(((int)((sg.frequency * 100)/totalASgg) * 100) / 100) + "%"}
								</div>
								<div class="ProgressBarFill"
									style="width: ${String.valueOf((sg.frequency * 100)/totalASgg) + "%"};"></div>

							</div>
							<div class="ProgressBarLink">
								<g:link controller="accountManager" action="addSuggestion"
									params="[idASgg: sg.id]">
									<g:message code="add.label" />
								</g:link>
								/
								<g:link controller="accountManager" action="ignoreSuggestion"
									params="[idASgg: sg.id]">
									<g:message code="ignore.label" />
								</g:link>
							</div>
						</div>
						<br />
						<g:set var="counter" value="${counter + 1}" />
					</g:each>
				</g:if>
				<g:else>
					<g:message code="emptyAutoSgg.msg" />
				</g:else>
			</div>
			<div class="columnRight">
				<p class="subtitle">
					<g:message code="suggestions.subtitle" />
				</p>
				<g:if test="${suggestions}">
					<g:set var="counter" value="${0}" />
					<g:each in="${suggestions}" var="sg">
						<g:if test="${sg.toString().length() > 31}">
							<div class="tooltip">
								${sg.toString().substring(0, 29).concat("...")}
								<span> ${suggestionsTT.get(counter)}
								</span>
							</div>
						</g:if>
						<g:else>
							<div class="tooltip">
								${sg}
							</div>
						</g:else>
						<div class="rowProgressBar">
							<div class="ProgressBar">
								<div class="ProgressBarText">
									${String.valueOf(((int)((sg.frequency * 100)/totalSgg) * 100) / 100) + "%"}
								</div>
								<div class="ProgressBarFill"
									style="width: ${String.valueOf((sg.frequency * 100)/totalSgg) + "%"};"></div>
							</div>
							<div class="ProgressBarLink">
								<g:link controller="accountManager" action="addSuggestion"
									params="[idSgg: sg.id]">
									<g:message code="add.label" />
								</g:link>
								/
								<g:link controller="accountManager" action="ignoreSuggestion"
									params="[idSgg: sg.id]">
									<g:message code="ignore.label" />
								</g:link>
							</div>
						</div>
						<br />
						<g:set var="counter" value="${counter + 1}" />
					</g:each>
				</g:if>
				<g:else>
					<g:message code="emptyUsersSgg.msg" />
				</g:else>
			</div>
		</g:else>
	</g:else> </content>
</body>
</html>